<template>
	<view class="">
		<button class="" @click="aliPay">点击支付</button>
		<rich-text :nodes="nodes"></rich-text>
		<div id="content">
			
		</div>
	</view>
</template>

<script>
	import {
		aliPay
	} from '@/utils/req/api.js'
	export default {
		data() {
			return {
				nodes: ''
			}
		},
		onShow() {},
		methods: {
			async aliPay() {
				let res = await aliPay();
				console.log('res', res);
				console.log('body', res.data.result.body)
				document.querySelector('#content').innerHTML = res.data.result.body;
				// 调用submit方法
				console.log(document.getElementsByTagName('form'))
				document.getElementsByTagName('form')[0].submit()
			}
		},
	}
</script>

<style>
	input {
		border: 1px solid red;
	}
</style>
